package com.genghis.ptas.postreply.service.impl;

import com.genghis.core.page.entity.PageParameter;
import com.genghis.ptas.postreply.dao.PostReplyDao;
import com.genghis.ptas.postreply.entity.PostReply;
import com.genghis.ptas.postreply.service.PostsReplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: yutong
 * Date: 14-4-22
 * Time: 下午8:16
 * To change this template use File | Settings | File Templates.
 */
@Transactional
@Service("postReplyService")
public class PostsReplyServiceImpl implements PostsReplyService {

    @Autowired
    private PostReplyDao postReplyDao;


    @Override
    public void addPostReply(PostReply postReply) {
        postReplyDao.addPostReply(postReply);
    }

    @Override
    public List<PostReply> findPostReplyPageList(PageParameter pageParameter, PostReply postReply, int postId) {
        return postReplyDao.findPostReplyPageList(pageParameter, postReply, postId);
    }

    @Override
    public void delOneReplyById(int id) {
        postReplyDao.delOneReplyById(id);
    }


}
